home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / QuickDraw 3D / Samples / SampleCode / Simplest Viewer App / OLD / VwrGestalt.c next >
Encoding:
C/C++ Source or Header  |  1997-08-14  |  576 b   |  29 lines  |  [TEXT/CWIE]

  1. /*
  2. **    Simple routine to check if the viewer is there
  3. **
  4. **    Nick Thompson, 2/4/96
  5. */
  6.  
  7. /* all we need is this header - to use the viewer */
  8. #include <QD3DViewer.h>
  9.  
  10. /*------------------------------------------------------------*/
  11.  
  12. /*
  13. ** This is a handy little routine to use
  14. ** Gestalt to check to see if the viewer is
  15. ** properly installed
  16. */
  17.  
  18. Boolean IsQD3DViewerInstalled()
  19. {
  20.     OSErr     theErr;
  21.     long     gesResponse;
  22.         
  23.     if ((theErr = Gestalt( gestaltQD3DViewer,&gesResponse ))!=noErr)
  24.         return false;
  25.         
  26.     return (gesResponse && ( gesResponse << gestaltQD3DViewerAvailable ));
  27. }
  28.  
  29.